using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Sandia.MVCFramework.Request
{
    /// <summary>
    /// A method to call that will access a feature.  
    /// </summary>
    public delegate void FeatureAccessorDelegate();

    /// <summary>
    /// The suggested type of feature accessor.
    /// </summary>
    public enum FeatureAccessorType
    {
        /// <summary>
        /// Indicates that the feature accessor should be displayed as a button
        /// </summary>
        Button,
        /// <summary>
        /// Indicates that the feature accessor should be displayed as a menu
        /// </summary>
        MenuItem
    }

    /// <summary>
    /// A request to add a feature accessor to at the application level.
    /// </summary>
    /// <remarks>
    /// Designed to be issued by plugin after being created to get items on the main user interface that
    /// accesses their features.
    /// </remarks>
    public class AddApplicationLevelFeatureAccessorRequest: SixParameterRequest<string, string, Image, string, FeatureAccessorDelegate, FeatureAccessorType> 
    {
        /// <summary>
        /// Create a new application level feature accessor
        /// </summary>
        /// <param name="Name">The human readable name of this feature</param>
        /// <param name="Tag">A tag to indicate the category of this feature</param>
        /// <param name="image">An iconic visualization of what the feature is</param>
        /// <param name="ToolTip">A tool tip to put on the UI component where the feature will be accessed</param>
        /// <param name="accessorFeatureDelegate">The method to call that launches this feature.</param>
        /// <param name="type">The suggested type of UI item to display</param>
        public AddApplicationLevelFeatureAccessorRequest(string Name, string Tag, Image image, string ToolTip, FeatureAccessorDelegate accessorFeatureDelegate, FeatureAccessorType type) 
            : base(Name, Tag, image, ToolTip, accessorFeatureDelegate, type) { }

        /// <summary>
        /// The human readable name of this feature
        /// </summary>
        public string Name
        {
            get { return this.Param1; }
        }

        /// <summary>
        /// A tag to indicate the category of this feature
        /// </summary>
        public string Tag
        {
            get { return this.Param2; }
        }

        /// <summary>
        /// An iconic visualization of what the feature is
        /// </summary>
        public Image Image
        {
            get { return this.Param3; }
        }

        /// <summary>
        /// A tool tip to put on the UI component where the feature will be accessed.
        /// </summary>
        public string ToolTip
        {
            get { return this.Param4; }
        }

        /// <summary>
        /// The method to call that launches this feature.
        /// </summary>
        public FeatureAccessorDelegate AccessFeatureDelegate
        {
            get { return this.Param5; }
        }

        /// <summary>
        /// The suggested UI type to display.
        /// </summary>
        public FeatureAccessorType FeatureAccessorType
        {
            get { return this.Param6; }
        }
    }
}
